<?php
  include_once("session.php");
?>
    <div id="header">
      
      <div id="headerLeft">
        <img src="img/logo1.png"></img>Beta        
      </div><!-- headerLeft -->
      <div id="headerCenter">
        <br/><br/>
      </div><!-- headerCenter -->               
<?php
  if ( IsSessionValid() ) {
?>        
      <div id="menu">      
        <ul>
          <li><?php echo '<b>'.$sessionUserName.'</b>' ?></li>        
          <li><a href="main.php">Home</a></li>
          <li><a href="profile.php">Profile</a></li>
          <li><a href="invite.php">Invite</a></li>
          <li><a href="download.php">Download</a></li>
          <li><a href="todo.php">Help</a></li>
          <li class="last"><a href="logout.php">LogOut</a></li>
        </ul>        
      </div> <!-- menu -->                
<?php
  }else{
?>            
      <form id="loginform" action="login.php" onsubmit="return loginSubmit();" method="post" enctype="multipart/form-data">        
      <div id="menu">      
        <ul>
          <li>                    
                Username:
                <input name="username" id="username" size="15" type="text">
                Password: <a href="forgotpass.php">(?)</a>                                              
                <input name="password" id="password" size="15" type="password"><input name="secpassword" id="secpassword" value="" type="hidden">
                <input id="login" name="login" value="Login" type="submit">      
          </li>
          <li><a href="index.php">Home</a></li>
          <li><a href="register.php">Register</a></li>                    
          <li><a href="invite.php">Invite</a></li>
          <li><a href="download.php">Download</a></li>                    
          <li class="last"><a href="todo.php">Help</a></li>
        </ul>               
      </div> <!-- menu -->                               
      </form>
<?php
  }
?>
    </div> <!-- header -->
